package com.lhy.controller;

import com.lhy.entity.Dept;
import com.lhy.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：罗昊宇
 * @Package：com.lhy.controller
 * @Project：springboot03
 * @name：DeptController
 * @Date：2024/3/7 0007  9:15
 * @Filename：DeptController
 */

@RestController
public class DeptController {
    @Autowired
    private DeptService deptService;
    @RequestMapping("/getAllDept")
    public List<Dept> selectAllDept(Dept dept){

        List<Dept> deptList = deptService.selectAllDept();

        return deptList;

    }
}
